package com.pan.kang.executor;


import com.pan.kang.core.PostProcessExecutor;
import com.pan.kang.core.PostProcessTask;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Slf4j
@Component
public class ClearShoppingCardExecutor implements PostProcessExecutor {

    @Override
    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    public void doExecute(PostProcessTask task) {
        log.info("清空购物车...");
    }
}
